
<!DOCTYPE html>
<html lang="zh-CN">

<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	
	<title>导航页信息管理</title>
	
	<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css">
	<link rel="stylesheet" type="text/css" href="css/font-awesome.min.css">
	<link rel="stylesheet" type="text/css" href="css/material-design-iconic-font.min.css">
	<link rel="stylesheet" type="text/css" href="css/util.css">
	<link rel="stylesheet" type="text/css" href="css/main.css">
</head>

<body>

	<div class="limiter">
		<div class="container-login100" style="background-image: url('image/bg-01.jpg');">
			<div class="wrap-login100 p-l-55 p-r-55 p-t-65 p-b-54">
				<div class="login100-form validate-form">
					<span class="login100-form-title-tiny p-b-20">导航页信息管理</span>
					<button onclick="introBtnClick()" class="btn-padding">个人简介</button>
					<button onclick="pageBtnClick()" class="btn-padding">网页清单管理</button>
					<button onclick="msgBtnClick()" class="btn-padding">留言管理</button>
					
					<div id="introductionDiv">
						<h5 class="title1">个人简介</h5>
						<textarea id="introduction" class="textarea1" readonly="readonly"></textarea>
						<div style="text-align: center;">
							<button class="btn2" onclick="textareaModify()">修改</button>
							<button class="btn2" onclick="modifyIntroduction()">提交</button>
						</div>
				
					</div>
					<div id="pageListDiv">
						<h5 class="title1">网页清单管理</h5>
						<div id="pageListShowDiv">
							<h5 class="title2">网址列表</h5>
							<button class="btn2" onclick="showAddDiv()">新增</button>
							<table border="1">
								<thead>
									<tr>
										<th class="th1">编号</th>
										<th class="th1">网站名/网址</th>
										<th class="th1">操作</th>
									</tr>
								</thead>
								<tbody id="tbody">
									<tr>
										<td>1</td>
										<td>网站1</td>
										<td>http://c.biancheng.net/vieml</td>
										<td>
											<button class="btn3">修改</button>
											<button class="btn3">删除</button>
										</td>
									</tr>
								</tbody>
							</table>
						</div>
						<div id="pageListModDiv">
							<h5 class="title2">修改</h5><br><br>
							<label for="pageId">ID:</label>
							<input id="pageId" disabled="disabled"/><br>
							<label for="pageName">网站名:</label>
							<input id="pageName" style="width: 100%; background-color: rgb(96,157,191);" placeholder="请输入网站名"/><br>
							<label for="url">网址:</label>
							<input id="url"  style="width: 100%; background-color: rgb(96,157,191);" !important" placeholder="请输入网址"/>
							<div style="text-align: center;">
								<button class="btn2" onclick="returnToPageList()">返回</button>
								<button class="btn2" onclick="modifyPage()">提交</button>
							</div>
						</div>
						<div id="pageListAddDiv">
							<h5 class="title2">新增</h5><br><br>
							<label for="newPageName">网站名</label>
							<input id="newPageName" style="width: 100%; background-color: rgb(96,157,191);" placeholder="请输入网站名"/><br>
							<label for="newUrl">网址</label>
							<input id="newUrl" style="width: 100%; background-color: rgb(96,157,191);" placeholder="请输入网址"/>
							<div style="text-align: center;">
								<button class="btn2" onclick="returnToPageList()">返回</button>
								<button class="btn2" onclick="addPage()">提交</button>
							</div>
						</div>
					</div>
					<div id="messageListDiv" class="tableDiv">
						<h5 class="title1">留言管理</h5>
		
						<h5 class="title2">留言列表</h5>
		
						<table border="1">
							<thead>
								<tr>
									<th class="th1">编号</th>
									<th class="th1">昵称/邮箱/时间/留言</th>
									<th class="th1">操作</th>
								</tr>
							</thead>
							<tbody id="msgTbody">
								<tr>
									<td>1</td>
									<td>小名</td>
									<td>你好！</td>
									<td>
										<button class="btn3">删除</button>
									</td>
								</tr>
							</tbody>
						</table>
					</div>
					

					<div class="text-right p-t-8 p-b-31">
						<br>
					</div>

					<div class="container-login100-form-btn">
						<div class="wrap-login100-form-btn">
							<div class="login100-form-bgbtn"></div>
							<button type="button" class="login100-form-btn" onclick="logout()">退 出 登 录</button>
						</div>
					</div>

				
				</div>
			</div>
		</div>
	</div>

	<script src="js/jquery-3.2.1.min.js"></script>
	<script src="js/main.js"></script>
	<script>
		let status = sessionStorage.getItem('status');
		if(status == 'yes'){
			
		}else{
			alert('请先登录！');
			window.location.href='login.html';
		}
		
		document.getElementById('introductionDiv').style.display='block';
		document.getElementById('pageListDiv').style.display='none';
		document.getElementById('messageListDiv').style.display='none';
		
		function logout(){
			sessionStorage.removeItem('status');
			window.location.reload();
		}
		
		function introBtnClick(){
			document.getElementById('introductionDiv').style.display='block';
			document.getElementById('pageListDiv').style.display='none';
			document.getElementById('messageListDiv').style.display='none';
		}
		function pageBtnClick(){
			document.getElementById('introductionDiv').style.display='none';
			document.getElementById('pageListDiv').style.display='block';
			document.getElementById('messageListDiv').style.display='none';
		}
		function msgBtnClick(){
			document.getElementById('introductionDiv').style.display='none';
			document.getElementById('pageListDiv').style.display='none';
			document.getElementById('messageListDiv').style.display='block';
		}
		function textareaModify(){
			document.getElementById('introduction').readOnly='';
		}
		
	</script>
	<script src="index.js"></script>
</body>
</html>
